package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:53:11
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelServiceParameterBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.Id);

        mappedDaoFields.put("serviceId",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.ServiceId);

        mappedDaoFields.put("parameterCode",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.ParameterCode);

        mappedDaoFields.put("parameterName",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.ParameterName);

        mappedDaoFields.put("parameterType",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.ParameterType);

        mappedDaoFields.put("dataTypeId",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.DataTypeId);

        mappedDaoFields.put("dataCheck",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.DataCheck);

        mappedDaoFields.put("isArray",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.IsArray);

        mappedDaoFields.put("sortIndex",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.SortIndex);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.Remarks);

        mappedDaoFields.put("dataType",
            com.ourteam.product.model.dao.IProductModelServiceParameterDAO.DataType);
    }

    private com.ourteam.product.model.dao.ProductModelServiceParameter productModelServiceParameter;

    public ProductModelServiceParameterBean() {
        super();

        this.productModelServiceParameter = new com.ourteam.product.model.dao.ProductModelServiceParameter();
    }

    public ProductModelServiceParameterBean(
        com.ourteam.product.model.dao.ProductModelServiceParameter productModelServiceParameter) {
        super();

        this.productModelServiceParameter = productModelServiceParameter;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelServiceParameter);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelServiceParameter convertToProductModelServiceParameter() {
        return this.productModelServiceParameter;
    }

    public com.ourteam.product.model.dao.ProductModelServiceParameter convertTo() {
        return this.productModelServiceParameter;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelServiceParameter.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelServiceParameter.setId(id);
    }

    /**
     * Get serviceId
     *
     * @return long
     */
    public long getServiceId() {
        return (long) this.productModelServiceParameter.getServiceId();
    }

    /**
     * Set serviceId
     *
     * @parameter long
     */
    public void setServiceId(long serviceId) {
        this.productModelServiceParameter.setServiceId(serviceId);
    }

    /**
     * Get parameterCode
     *
     * @return String
     */
    public String getParameterCode() {
        return (String) this.productModelServiceParameter.getParameterCode();
    }

    /**
     * Set parameterCode
     *
     * @parameter String
     */
    public void setParameterCode(String parameterCode) {
        this.productModelServiceParameter.setParameterCode(parameterCode);
    }

    /**
     * Get parameterName
     *
     * @return String
     */
    public String getParameterName() {
        return (String) this.productModelServiceParameter.getParameterName();
    }

    /**
     * Set parameterName
     *
     * @parameter String
     */
    public void setParameterName(String parameterName) {
        this.productModelServiceParameter.setParameterName(parameterName);
    }

    /**
     * Get parameterType
     *
     * @return String
     */
    public String getParameterType() {
        return (String) this.productModelServiceParameter.getParameterType();
    }

    /**
     * Set parameterType
     *
     * @parameter String
     */
    public void setParameterType(String parameterType) {
        this.productModelServiceParameter.setParameterType(parameterType);
    }

    /**
     * Get dataTypeId
     *
     * @return long
     */
    public long getDataTypeId() {
        return (long) this.productModelServiceParameter.getDataTypeId();
    }

    /**
     * Set dataTypeId
     *
     * @parameter long
     */
    public void setDataTypeId(long dataTypeId) {
        this.productModelServiceParameter.setDataTypeId(dataTypeId);
    }

    /**
     * Get dataCheck
     *
     * @return String
     */
    public String getDataCheck() {
        return (String) this.productModelServiceParameter.getDataCheck();
    }

    /**
     * Set dataCheck
     *
     * @parameter String
     */
    public void setDataCheck(String dataCheck) {
        this.productModelServiceParameter.setDataCheck(dataCheck);
    }

    /**
     * Get isArray
     *
     * @return String
     */
    public String getIsArray() {
        return (String) this.productModelServiceParameter.getIsArray();
    }

    /**
     * Set isArray
     *
     * @parameter String
     */
    public void setIsArray(String isArray) {
        this.productModelServiceParameter.setIsArray(isArray);
    }

    /**
     * Get sortIndex
     *
     * @return int
     */
    public int getSortIndex() {
        return (int) this.productModelServiceParameter.getSortIndex();
    }

    /**
     * Set sortIndex
     *
     * @parameter int
     */
    public void setSortIndex(int sortIndex) {
        this.productModelServiceParameter.setSortIndex(sortIndex);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelServiceParameter.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelServiceParameter.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelServiceParameter.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelServiceParameter.setRemarks(remarks);
    }

    /**
     * Get dataType
     *
     * @return String
     */
    public String getDataType() {
        return (String) this.productModelServiceParameter.getDataType();
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelServiceParameterBean) == false) {
            return false;
        } // end if

        ProductModelServiceParameterBean other = (ProductModelServiceParameterBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelServiceParameter tempProductModelServiceParameter =
            other.convertToProductModelServiceParameter();

        if ((tempProductModelServiceParameter == null) ||
                (this.productModelServiceParameter == null)) {
            isEqual = false;
        } else if ((tempProductModelServiceParameter == this.productModelServiceParameter) ||
                tempProductModelServiceParameter.equals(
                    this.productModelServiceParameter)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelServiceParameterBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceParameter[] aProductModelServiceParameters) {
        return toArray(aProductModelServiceParameters, null);
    }

    public static ProductModelServiceParameterBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceParameter[] aProductModelServiceParameters,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelServiceParameters)) {
            return new ProductModelServiceParameterBean[0];
        }

        int length = aProductModelServiceParameters.length;

        ProductModelServiceParameterBean[] beans = new ProductModelServiceParameterBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelServiceParameterBean(aProductModelServiceParameters[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelServiceParameters[i] });
            }
        }

        return beans;
    }
}
